!!! Strict
%html{:lang => "en", :xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
    %title CMS
    =stylesheet_link_tag 'admin'
    =javascript_include_tag 'admin'
    =csrf_meta_tag
  %body
    #container
      #header
        -if CMS_CONFIG["COMPANY_LOGO"].present?
          %h1=link_to image_tag(CMS_CONFIG['COMPANY_LOGO'], :alt => 'CMS', :title => 'CMS'), root_path
        -else
          %h1=link_to "CMS", root_path

        #user-navigation
          %ul.wat-cf
            %li=link_to pat(:main), root_path
            -if current_user
              %li
                %b=h current_user.email
              %li=link_to pat(:logout), logout_path, :method => :delete    
            -else
              %li=link_to pat(:login), login_path

        #main-navigation
          %ul.wat-cf
            -admin_project_modules.each do |project_module|
              %li{:class => ("active" if request.path_info =~ /^#{project_module.path}/)}
                =link_to project_module.name, project_module.path

      #wrapper.wat-cf
        .flash!=[:error, :warning, :notice].map { |type| content_tag(:div, flash[type], :class => "message #{type}") if flash[type] }.join
        #main
          =yield
        #sidebar
          =yield :sidebar
      #footer
        .block
          %p
            =CMS_CONFIG["COMPANY"]
            Confidential.
            Copyright &copy;
            =Time.now.year
            =CMS_CONFIG["COMPANY"]
